<?php session_start();
require '../common/Utility.php';
require '../db/configuration.php';
require '../crud/CustomSecurity.class.php';
require '../crud/Users.class.php';
loadDB();
isAdmin();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
    <link rel="stylesheet" type="text/css" href="../css/page.css" />
    <link rel="stylesheet" type="text/css" href="../css/generalProduct.css" />
<title>categoryNew</title>
<meta name="author" content="Димитър Гьормов">
<!-- Date: 2008-12-09 -->
</head>
<body>
<a class="lenta" href="index.php"> Начало </a>
<div id="main">
<?php
require '../crud/Vid_kolichestvo.class.php';
loadDB();
backAction();

?>

<form action="quontityType.php" method="post">Category Name: 
<input type="text" name="category">
Step:
<input type="text" name="step">

 <input type="submit" value="Add"></form>


<?php

$crud = new Vid_kolichestvo(con());

if (isset($_POST['category'])){
	$crud->add($_POST['category'], $_POST['step'] );
} else if(isset($_POST['Remove'])) {
	$crud->remove($_POST['id']);
}
$tHeaders[0] = 'Tip Kolichestvo';
$tHeaders[1] = 'Step';
$tHeaders[2] = 'Delete';

list_table_raw($crud->getAllAdmin(), 'quontityType.php', $tHeaders,'Quontity');
?>

</div>
</body>
</html>
